package com.jv.spring.other;

import com.jv.spring.other.define.City;
import com.jv.spring.other.define.Dept;
import com.jv.spring.other.define.User;
import com.jv.spring.other.scan.Employee;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class OtherMain {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(OtherConfig.class);
		User user = ac.getBean(User.class);
		System.out.println(user.getUserName());
		City city = ac.getBean(City.class);
		Dept dept = ac.getBean(Dept.class);
		System.out.println(dept.getDeptName());
		Employee employee = ac.getBean(Employee.class);
		System.out.println(employee.getEmpName());
	}
}
